home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / MACUNZIP / MACUNZIP.H < prev    next >
Text File  |  1991-08-17  |  2KB  |  45 lines

  1. /*  UnZip for the Macintosh                                          */
  2. /*                                                                   */
  3. /*  John Eng    July 1991                                            */
  4. /*                                                                   */
  5. /*  Based on the TURBO C Version 2.0.1 for the IBM by Samuel H.      */
  6. /*  Smith as modified by George M. Sipe for "portability" to UNIX,   */
  7. /*  Microsoft C for the IBM, and other machines.                     */
  8. /*                                                                   */
  9. /*  This file contains declarations to compensate for                */
  10. /*  non-portability of the main source code.  Please see comments    */
  11. /*  in the main source file for further information.  Declarations   */
  12. /*  that are specific to the Macintosh are marked "NNONMS" (Not      */
  13. /*  Necessary on Non-Macintosh Systems) for those who may want       */
  14. /*  to port this code to other systems.                              */
  15.  
  16. #include <unix.h>          /* Lightspeed C header file; NNONMS */
  17.  
  18. #define OLDC 1             /* Flag use of old-style C declarations */
  19. #define HIGH_LOW 1         /* Flag Motorola-style byte ordering */
  20.  
  21. #define S_IREAD 0x0100     /* Not found in all UNIX implementations */
  22. #define S_IWRITE 0x0080    /* Not found in all UNIX implementations */
  23. #define SEEK_CUR 1         /* Not in <unix.h> (though it should); NNONMS */
  24.  
  25. /*  The following #define is necessary because malloc() does not work  */
  26. /*  with Lightspeed C v2.01 (though it should).                        */
  27.  
  28. #define malloc(X) NewPtr((unsigned long)(X))    /* NNONMS */
  29.  
  30. /*  utime() and *memcpy() are not available in Lightspeed C v2.01      */
  31. /*  (nor in some UNIX systems) and are defined in "MacUnZip.c".        */
  32.  
  33. int        utime();
  34. void    *memcpy();
  35. void    MacInit();    /* Initialization routine for the Macintosh; NNONMS */
  36.  
  37. /*  The following "large" memory buffers require explicit allocation   */
  38. /*  with malloc() in MacInit() due to the 32K memory segment limit     */
  39. /*  of the Macintosh operating system.  This way of handling the       */
  40. /*  memory buffers is standard C and should work on non-Macintosh      */
  41. /*  systems.                                                           */
  42.  
  43. int                *prefix_of;
  44. unsigned char    *suffix_of;
  45. unsigned char    *stack;